package com.yunsc.order.orderEnum;

import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.converters.WriteConverterContext;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.baomidou.mybatisplus.annotation.IEnum;

/**
 * @version: 1.0
 * @Author: adan
 * @description:
 * @date: 2024-05-28 21:20
 */
public class OrderEnumConverter implements Converter<IEnum> {

    /**
     * 这里是写的时候会调用
     *
     * @return
     */
    @Override
    public WriteCellData<?> convertToExcelData(WriteConverterContext<IEnum> context) throws Exception {
        return new WriteCellData<>(context.getValue().toString()); // 导出的时候重写改方法
    }
}
